<template>
	<view>
		{{ $t('index.abc') }}
	</view>
	
	<button @click="handleClick">中文</button>
	<button @click="handleClick1">英文</button>
</template>

<script setup>
	// import { init } from '@dcloudio/uni-i18n'
	import { useI18n } from 'vue-i18n'
	const i18n = useI18n();
	const handleClick = () => {
		uni.setLocale('zh')
		i18n.locale.value = 'zh'
	}
	
	const handleClick1 = () => {
		uni.setLocale('en')
		i18n.locale.value = 'en'
	}
</script>
